// vite.config.js
import {
	defineConfig
} from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
import path from 'path'

export default defineConfig({
	plugins: [uni()],
	css: {
		preprocessorOptions: {
			scss: {
				additionalData: `@import "uview-plus/index.scss";`
			}
		}
	},
	resolve: {
		alias: {
			'@': path.resolve(__dirname, 'src'),
			'@components': path.resolve(__dirname, 'src/components'),
			'@pages': path.resolve(__dirname, 'src/pages'),
			'@static': path.resolve(__dirname, 'src/static'),
			'@utils': path.resolve(__dirname, 'src/utils'),
			'@api': path.resolve(__dirname, 'src/api'),
			'@store': path.resolve(__dirname, 'src/store'),
			'uview-ui': path.resolve(__dirname, 'node_modules/uview-plus')
		}
	}
})